<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>缩放</title>
    <style>
        html{
            perspective: 800px;
        }
        .box1{
            width:100px;
            height:100px;
            background-color: aqua;
            transition: 2s;
            margin:0 auto;
            /*2、变形原点：默认值center*/
            transform-origin:20px 20px;
        }
        .box1:hover{
            /*1、对元素进行缩放的函数
            （1）scaleX()水平方向的缩放
            （2）scaleY()垂直方向的缩放
            （3）scale()双方向的缩放*/
            transform: scale(2);
        }
        .img-wrapper{
            width:200px;
            height:200px;
            border:solid red 1px;
            overflow: hidden;
        }
        img{
            transition: .2s;
        }
        .img-wrapper:hover img{
            transform: scale(1.2);
        }
    </style>
</head>
<body>
    <div class="box1"></div>
    <div class="img-wrapper">
        <img src="./picture/2.jpg" width="100%">
    </div>
</body>
</html>